#include <bits/stdc++.h>

#include <atcoder/all>
#define LL long long
using namespace std;
using namespace atcoder;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int N, M;
  cin >> N >> M;

  vector<int> sum(M + 1, 0), cnt(M + 1, 0);
  for (int i = 0; i < N; i++) {
    int A, B;

    cin >> A >> B;
    cnt[A]++;
    sum[A] += B;
  }
  for (int i = 1; i <= M; i++) {
    cout << setiosflags(ios::fixed) << setprecision(10) << (double)sum[i] / cnt[i] << "\n";
  }
  return 0;
}
